
import 'package:flutter/material.dart';

class PageTwo extends StatefulWidget {
  const PageTwo({Key? key}) : super(key: key);

  @override
  _PageTwoState createState() => _PageTwoState();
}

class _PageTwoState extends State<PageTwo> {
  int count = 0;
  @override
  Widget build(BuildContext context) {
    debugPrint("重构第二个界面");

    return Column(children: [
      Text("点击了$count次"),
      ElevatedButton(onPressed: (){
        count++;
        setState(() {});
      }, child: const Text("刷新第二个页面"))
    ],);
  }
}
